<%@ page import="com.shamar.blog.entity.BlogUser" %>
<%@ page language="java" contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!--输出,条件,迭代标签库-->
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page isELIgnored="false" %>
<%!
        public BlogUser blogUser;
        public Boolean isLogin;
        public Integer loginId;
%>
<%
        blogUser = (BlogUser) session.getAttribute("currentBlogUser");
        if (blogUser!=null){ loginId = blogUser.getId();
                request.setAttribute( "loginId", loginId);
                isLogin = true;}
        else{
                isLogin=false;
        }

%>
<!doctype html>
        <!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en-US"> <![endif]-->
        <!--[if IE 7]>    <html class="lt-ie9 lt-ie8" lang="en-US"> <![endif]-->
        <!--[if IE 8]>    <html class="lt-ie9" lang="en-US"> <![endif]-->
        <!--[if gt IE 8]><!--> <html lang="en-US"> <!--<![endif]-->
        <head>
                <!-- META TAGS -->
                <meta charset="UTF-8" />
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <title>博文列表</title>
                <link rel="shortcut icon " type="images/x-icon" href="me.ico">
                <!-- Style Sheet-->

                <link rel='stylesheet' href='css/header.css' type='text/css' media='all' />
                <link rel='stylesheet' id='custom-css-css' href='css/custom5152.html?ver=1.0' type='text/css'>

                <%--引入js文件--%>
                <%@include file="include_js.jsp" %>
                <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
                <!--[if lt IE 9]>
                <script src="js/html5.js"></script></script>
                <![endif]-->


        </head>

        <body>

                <!-- Start of Header -->
                <%@include file="header_bar.jsp" %>
                <!-- End of Header -->

                <!-- Start of Search Wrapper -->
                <%@include file="search_wrapper.jsp" %>
                <!-- End of Search Wrapper -->

                <!-- Start of Page Container -->
                <div class="page-container">
                        <div class="container">
                                <div class="row">

                                        <!-- start of page content -->
                                        <div class="span8 main-listing">
                                                <c:forEach items="${ContentList}" var="latestContent">
                                                <article class="format-standard type-post hentry clearfix">

                                                        <header class="clearfix">

                                                                <h3 class="post-title">
                                                                        <a href="/community/view_blog?i=${latestContent.id}">${latestContent.title}</a>
                                <c:if test="${latestContent.userId == loginId && latestContent.userId!=null}">
<a href="/community/edit_blog?id=${latestContent.id}" title="编辑"><i class="icon-edit"></i></a>
<%--<a href="" title="删除" onclick="return confirm('确定删除?')"><i class="icon-trash"></i></a>--%>
                                </c:if>
                                                                </h3>

                                                                <div class="post-meta clearfix">
                                                                        <span class="date"><fmt:formatDate value="${latestContent.pushtime}" pattern="yyyy年 MM月 dd日"/></span>
                                                                        <span class="category"><a href="/community/articles_list?cid=${latestContent.categoryId}" title="View all posts in ${latestContent.categoryName}">${latestContent.categoryName}</a></span>
                                                                        <span class="comments"><a href="#" title="Comment on Integrating WordPress with Your Website">3 Comments</a></span>
                                                                        <span class="like-count">66</span>
                                                                </div><!-- end of post meta -->

                                                        </header>

                                                        <p>${latestContent.content}. . . <a class="readmore-link" href="/community/view_blog?i=${latestContent.id}">阅读更多</a></p>

                                                </article>
                                                </c:forEach>
                                                <div id="pagination">
                                                        <a href="#" class="btn active">1</a>
                                                        <a href="#" class="btn">2</a>
                                                        <a href="#" class="btn">3</a>
                                                        <a href="#" class="btn">4</a>
                                                        <a href="#" class="btn">5</a>
                                                        <a href="#" class="btn">Next »</a>
                                                        <a href="#" class="btn">Last »</a>
                                                </div>

                                        </div>
                                        <!-- end of page content -->


                                        <!-- start of sidebar -->
                                        <aside class="span4 page-sidebar">

                                            <section class="widget">
                                                <div class="support-widget">
                                                    <h3 class="title">支持</h3>
                                                    <p class="intro">找不到想要的?如果您没有找到合适的,您可以联系我们</p><a href="mailto:fxm0911@foxmail.com">fxm0911@Foxmail.com</a>
                                                </div>
                                            </section>
                                                <section class="widget">
                                                        <h3 class="title">Featured Articles</h3>
                                                        <ul class="articles">
                                                                <li class="article-entry standard">
                                                                        <h4><a href="single.html">Integrating WordPress with Your Website</a></h4>
                                                                        <span class="article-meta">25 Feb, 2013 in <a href="#" title="View all posts in Server &amp; Database">Server &amp; Database</a></span>
                                                                        <span class="like-count">66</span>
                                                                </li>
                                                                <li class="article-entry standard">
                                                                        <h4><a href="single.html">WordPress Site Maintenance</a></h4>
                                                                        <span class="article-meta">24 Feb, 2013 in <a href="#" title="View all posts in Website Dev">Website Dev</a></span>
                                                                        <span class="like-count">15</span>
                                                                </li>
                                                                <li class="article-entry video">
                                                                        <h4><a href="single.html">Meta Tags in WordPress</a></h4>
                                                                        <span class="article-meta">23 Feb, 2013 in <a href="#" title="View all posts in Website Dev">Website Dev</a></span>
                                                                        <span class="like-count">8</span>
                                                                </li>
                                                                <li class="article-entry image">
                                                                        <h4><a href="single.html">WordPress in Your Language</a></h4>
                                                                        <span class="article-meta">22 Feb, 2013 in <a href="#" title="View all posts in Advanced Techniques">Advanced Techniques</a></span>
                                                                        <span class="like-count">6</span>
                                                                </li>
                                                        </ul>
                                                </section>
                                                <section class="widget"><h3 class="title">推荐分类</h3>
                                                        <ul>
                                                                <c:forEach items="${allCategory}" var="category" varStatus="current">
                                                                        <c:if test="${current.index < 5}"><li><a href="/community/articles_list?cid=${category.id}" title="${category.categoryName}">${category.categoryName}</a> </li>
                                                                        </c:if>
                                                                </c:forEach>
                                                        </ul>
                                                </section>

                                                <section class="widget">
                                                        <h3 class="title">Recent Comments</h3>
                                                        <ul id="recentcomments">
                                                                <li class="recentcomments"><a href="#" rel="external nofollow" class="url">John Doe</a> on <a href="#">Integrating WordPress with Your Website</a></li>
                                                                <li class="recentcomments">saqib sarwar on <a href="#">Integrating WordPress with Your Website</a></li>
                                                                <li class="recentcomments"><a href="#" rel="external nofollow" class="url">John Doe</a> on <a href="#">Integrating WordPress with Your Website</a></li>
                                                                <li class="recentcomments"><a href="#" rel="external nofollow" class="url">Mr WordPress</a> on <a href="#">Installing WordPress</a></li>
                                                        </ul>
                                                </section>
                                        </aside>
                                        <!-- end of sidebar -->
                                </div>
                        </div>
                </div>
                <!-- End of Page Container -->

                <!-- Start of Footer -->
                <%@include file="footer_bar.jsp" %>
                <!-- End of Footer -->

                <a href="#top" id="scroll-top"></a>

        </body>
</html>
